

import 'package:get/get.dart';

class User{
  int? id;
  String? psName;
  String? psWord;
  int? psAuth;
  String? psBuilds;
  String? psStartDate;
  String? psExDate;
  int? psStatus;
  int? psErrCnt;
  String? psFirstName;
  String? psLastName;
  String? psPhoneNum;
  String? tokenID;
  int? sysType;

  User({this.id,
    this.psName,
    this.psWord,
    this.psAuth,
    this.psBuilds,
    this.psStartDate,
    this.psExDate,
    this.psStatus,
    this.psErrCnt,
    this.psFirstName,
    this.psLastName,
    this.psPhoneNum,
    this.tokenID,
    this.sysType});

  @override
  String toString() {
    return "id:${id}，psName:${psName},psAuth:${psAuth},psBuilds:${psBuilds}";
  }

  String getPsAuthName(){
    String name = "";
    if(1==psAuth){
      name = "management".tr;
    }else if(2==psAuth){
      name = "admin".tr;
    }else if(3==psAuth){
      name = "districtMgr".tr;
    }else if(4==psAuth){
      name = "depotMgr".tr;
    }else if(5==psAuth){
      name = "technican".tr;
    }else if(6==psAuth){
      name = "client".tr;
    }
    return name;
  }
}